package com.wms.controller;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

import com.wms.service.sys.IUserService;

@Controller
@RequestMapping("/hello")
public class HelloController {

	@RequestMapping(value = "/hello")
	public String printHello(ModelMap model) {
		System.out.println("===============");

		
		model.put("hello", "hello : sdsd");
//		test();
		userService.findUser();
		return "hello";
	}
	
	
	@RequestMapping(value = "/printException")
	public String printException(ModelMap model) {
		System.out.println("===============");
		String str = null;
		boolean flag = true;
		if(flag) {
			System.out.println(str.toString());
		}
		
		return "hello";
	}

	@RequestMapping(value = "/test")
	public void test() {
		System.out.println("is ok!");
	}
	
	@Resource(name = "userService")
	private IUserService userService;
}